﻿package com.yf.weiboair.container
{
	import flash.display.MovieClip;
	import flash.display.Sprite;
	import flash.display.Stage;

	import spark.components.Group;

	public class Container extends Sprite
	{

		public function creatContainer(_container:Object, _item:Sprite, _x:Number, _y:Number):Sprite
		{
			_item.x=_x;
			_item.y=_y;
			_container.addChild(_item);
			return _item;
		}

		static public function cleanContainer(_container:Object):void
		{
			if (_container is Group)
			{
				for (var i:int=_container.numChildren - 1; i > -1; i--)
					_container.removeElementAt(i);
			}
			else if (_container is Sprite)
			{
				for (var j:int=_container.numChildren - 1; j > -1; j--)
					_container.removeChildAt(j);
			}


		}



	}
}